<template>
    <div>
        <van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" />

        <van-nav-bar title="首页" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="(item, index) in swiperdatalist">
                <img :src="item.image_src" alt="">
            </van-swipe-item>
        </van-swipe>


    </div>
</template>

<script setup>
import { h, ref } from 'vue';
import axios from 'axios'
let swiperdatalist = ref([])
axios.get('https://api-hmugo-web.itheima.net/api/public/v1/home/swiperdata').then(res => {
    swiperdatalist.value = res.data.message
})
</script>

<style lang="scss" scoped>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
    width: 100%;
    height: 200px;
}

img {
    width: 100%;
    height: 200px;
}
</style>